import QtQuick 2.6
import QtQuick.Layouts 1.2

import "../Base/UiBase"
import "../Base/Config"

import "./Nav" as Nav

Rectangle {
    id: root

    property Item tcIndex: container
    color: Color.background

    ColumnLayout {
        anchors.fill: parent
        spacing: 0

        Nav.Index {
            id: head

            Layout.fillWidth: true
            Layout.preferredHeight: 96.0 * Size.ratio
            z: 1

            page: "community"
        }

        Item {
            id:container
            Layout.fillWidth: true
            Layout.fillHeight: true
            Loader {
                anchors.fill:parent
                source: {
                    if(head.page === "community")
                        return "Community/Index.qml"
                    if(head.page === "friends")
                        return "Friends/Index.qml"
                    return "Newest/Index.qml"
                }
            }
        }
    }
}
